package avicit.bdp.dds.server.master.dispatch.host;

import avicit.bdp.dds.remote.utils.Host;
import avicit.bdp.dds.server.master.dispatch.host.assign.RoundRobinSelector;
import avicit.bdp.dds.server.master.dispatch.host.assign.Selector;

import java.util.Collection;


/**
 *  round robin host manager
 */
public class RoundRobinHostManager extends CommonHostManager {

    /**
     * selector
     */
    private final Selector<Host> selector;

    /**
     * set round robin
     */
    public RoundRobinHostManager(){
        this.selector = new RoundRobinSelector<>();
    }

    @Override
    public Host select(Collection<Host> nodes) {
        return selector.select(nodes);
    }

}
